package com.toe.commodity.webapi.service.impl;

import com.toe.commodity.service.CommodityClassesTypeService;
import com.toe.pojo.entity.commodity.CommodityClassesType;
import com.toe.commodity.webapi.mapper.CommodityClassesTypeMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.toe.pojo.vo.commodity.CommodityClassTypeVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */

@Service
@DubboService
public class CommodityClassesTypeServiceImpl extends ServiceImpl<CommodityClassesTypeMapper, CommodityClassesType> implements CommodityClassesTypeService {

    @Autowired
    CommodityClassesTypeMapper commodityClassesTypeMapper;

    @Override
    public List<CommodityClassTypeVO> getCommodityClassType() {
        return commodityClassesTypeMapper.getCommodityClassType();

    }

    @Override
    public void addNewCommodityClassType(String classTypeName) {
        commodityClassesTypeMapper.addNewCommodityClassType(classTypeName);
    }

    @Override
    public void deletedCommodityClassType(Long id) {
        commodityClassesTypeMapper.deletedCommodityClassType(id);
    }

    @Override
    public void updateCommodityClassTypeName(CommodityClassesType commodityClassesType) {
        commodityClassesTypeMapper.updateCommodityClassTypeName(commodityClassesType);
    }

}
